<div class="nav">
   <a class="sel" href="{:U('order_num')}">订单数统计</a>
</div>
<div class="search">
     <form method="get" action="">
        <a class="quick_btn<if condition="$quick eq 30">_sel</if>"  href="{:U('member')}">最近30天</a> &nbsp; 选择时间段：<input type="text" id="btime" name="btime" value="{$btime}" onclick="WdatePicker({dateFmt:'yyyy-MM-dd'})" class="date" /> - <input type="text" id="etime" name="etime" value="{$etime}" onclick="WdatePicker({dateFmt:'yyyy-MM-dd'})" class="date" />&nbsp;
        按 <select name="type" id="type" class="sel1">
            <option value="日">日</option>
            <option value="月">月</option>
            <option value="年">年</option>
          </select>
        <input type="submit" class="btn_search" name="submit" value="搜索"  />
        <input type="submit" class="btn3" name="submit" value="导出报表"/>
        <input type="hidden" name="p" value="1" />
     </form>
    <script type="text/javascript">
        $("#type").val("{$type}");
    </script>
</div>
<div class="list">
<div id="chart" style="height:400px;"></div>
    <script src="__PUBLIC__/common/echarts-2.2.7/echarts-all.js"></script>
    <script>
        var myChart = echarts.init(document.getElementById('chart'));
        var option = {
    title : {
        text: '订单数',
        subtext: '按{$type}统计'
    },
    tooltip : {
        trigger: 'axis'
    },
    toolbox: {
        show : true,
        feature : {
            mark : {show: true},
            dataView : {show: true, readOnly: false},
            magicType : {show: true, type: ['line', 'bar']},
            restore : {show: true},
            saveAsImage : {show: true}
        }
    },
    calculable : true,
    xAxis : [
        {
            type : 'category',
            boundaryGap : false,
            data : [{$chart_x}]
        }
    ],
    yAxis : [
        {
            type : 'value',
            axisLabel : {
                formatter: '{value}人'
            }
        }
    ],
    series : [
        {
            name:'最高订单数',
            type:'bar',
            data:[{$chart_y}],
            markPoint : {
                data : [
                    {type : 'max', name: '最大值'},
                    {type : 'min', name: '最小值'}
                ]
            },
            markLine : {
                data : [
                    {type : 'average', name: '平均值'}
                ]
            }
        }
    ]
};
                    
        myChart.setOption(option);
    </script>
    
<table class="table_list">
  <thead><tr>
    <td width="50px">序号</td>
    <td>日期</td>
    <td >订单数</td>
  </tr>
  </thead>
  <tbody>
  <foreach name="list" item="list" key="k">
    <tr>
    <td>{$k+1}</td>  
    <td style="text-align: left">{$list.day}</td>
    <td>{$list.total}</td>
  </tr>
  </foreach>
  </tbody>
  <tfoot>
      <tr>
          <td colspan="2" style="color:#999;">只统计已支付有效订单
          </td>
          <td>共：{$total}</td>
      </tr>
  </tfoot>
</table>
</div>
